#ifndef HTTPWORKER_H
#define HTTPWORKER_H

#include <QRunnable>
#include <QObject>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QJsonObject>

#include "NetWorkerDef.h"

class HttpWorker : public QObject, public QRunnable
{
    Q_OBJECT
public:
    explicit HttpWorker(const QUrl &url, const QJsonObject & jsParam,QObject *parent = nullptr);
    void run() override;

signals:
    void requestFinished(QNetworkReply *reply);

    void requestLoginFinished(QByteArray responseData);
    void requestGetPersonInfoListFinished(QByteArray responseData);
private:
    QUrl m_url;
    QJsonObject m_jsParam;
};
#endif // HTTPWORKER_H
